﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Extensil.Discovery.SPDL;
using Extensil.Common.CategoryHandler.Discovery;
using Extensil.Common;

namespace DebugDiscovery
{
    public partial class Form1 :Form
    {
        static BackgroundWorker bwDiscovery = new BackgroundWorker();
        static DiscoveryResultList _discoveryResults;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Discover();
        }
        void Discover()
        {
            try
            {
                SPDiscovery dm = new SPDiscovery();
                ProbeParamList p = new ProbeParamList();
                p.Add(new ProbeParam("SiteUrl", "http://ams1-s-06741.europe.shell.com:40504"));
                p.Add(new ProbeParam("DocumentLibrary", "MyTaskCategory"));
                dm.Connect(p);
                _discoveryResults = dm.Search();

            }
            catch(Exception exc)
            {
                AlertBox.ShowDialog(exc);
            }
        }
    }
}
